/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package design;

/**
 *
 * @author use
 */
public class frmGiaovien extends javax.swing.JFrame {

    /**
     * Creates new form frmGiaovien
     */
    String maGV;
    String tenGV;
    String matkhau;
    public frmGiaovien() {
        initComponents();
    }
    
    public frmGiaovien(String maGV,String tenGV,String matkhau) {
        initComponents();
        lbMaGV.setText(maGV);
        lbTen.setText(tenGV);
       
        this.maGV = maGV;
        this.tenGV =  tenGV;
        this.matkhau = matkhau;
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        pnThongtin = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        lbTen = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        lbMaGV = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        pnChucnang = new javax.swing.JPanel();
        btnDangkiMonday = new javax.swing.JButton();
        btnXemLichGD = new javax.swing.JButton();
        btnNhapdiem = new javax.swing.JButton();
        btnThoat = new javax.swing.JButton();
        btnDoiMK = new javax.swing.JButton();
        btnXemThongbao = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);
        getContentPane().setLayout(new java.awt.CardLayout());

        pnThongtin.setBackground(new java.awt.Color(255, 255, 255));
        pnThongtin.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Thông tin giáo viên", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), new java.awt.Color(0, 0, 204))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel1.setText("Họ tên:");

        lbTen.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbTen.setText("Tên");

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel5.setText("Mã giáo viên:");

        lbMaGV.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbMaGV.setText("Mã giáo viên");

        javax.swing.GroupLayout pnThongtinLayout = new javax.swing.GroupLayout(pnThongtin);
        pnThongtin.setLayout(pnThongtinLayout);
        pnThongtinLayout.setHorizontalGroup(
            pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnThongtinLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnThongtinLayout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(lbMaGV, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE))
                    .addGroup(pnThongtinLayout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addComponent(lbTen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnThongtinLayout.setVerticalGroup(
            pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnThongtinLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(lbMaGV))
                .addGap(18, 18, 18)
                .addGroup(pnThongtinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnThongtinLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(lbTen)
                        .addGap(75, 75, 75))
                    .addGroup(pnThongtinLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Trường đại học Thành Đô", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), new java.awt.Color(0, 0, 204))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 266, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        pnChucnang.setBackground(new java.awt.Color(255, 255, 255));
        pnChucnang.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Chức năng", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), new java.awt.Color(0, 0, 204))); // NOI18N

        btnDangkiMonday.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnDangkiMonday.setText("Đăng kí môn dạy");
        btnDangkiMonday.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDangkiMondayActionPerformed(evt);
            }
        });

        btnXemLichGD.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnXemLichGD.setText("Xem lịch giảng dạy");
        btnXemLichGD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXemLichGDActionPerformed(evt);
            }
        });

        btnNhapdiem.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnNhapdiem.setText("Nhập điểm");
        btnNhapdiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNhapdiemActionPerformed(evt);
            }
        });

        btnThoat.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnThoat.setText("Thoát");
        btnThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThoatActionPerformed(evt);
            }
        });

        btnDoiMK.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnDoiMK.setText("Đổi mật khẩu");
        btnDoiMK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDoiMKActionPerformed(evt);
            }
        });

        btnXemThongbao.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnXemThongbao.setText("Xem thông báo");
        btnXemThongbao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXemThongbaoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnChucnangLayout = new javax.swing.GroupLayout(pnChucnang);
        pnChucnang.setLayout(pnChucnangLayout);
        pnChucnangLayout.setHorizontalGroup(
            pnChucnangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnChucnangLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnChucnangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnChucnangLayout.createSequentialGroup()
                        .addGroup(pnChucnangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnDangkiMonday, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnXemLichGD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnNhapdiem, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(btnDoiMK, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnXemThongbao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnThoat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnChucnangLayout.setVerticalGroup(
            pnChucnangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnChucnangLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnDangkiMonday)
                .addGap(18, 18, 18)
                .addComponent(btnXemLichGD)
                .addGap(18, 18, 18)
                .addComponent(btnNhapdiem)
                .addGap(18, 18, 18)
                .addComponent(btnDoiMK)
                .addGap(18, 18, 18)
                .addComponent(btnXemThongbao)
                .addGap(18, 18, 18)
                .addComponent(btnThoat)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Main", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), new java.awt.Color(0, 0, 204))); // NOI18N

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/elegant WA teacher compass copy.png"))); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jLabel2)
                .addGap(0, 8, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(pnThongtin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(pnChucnang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnThongtin, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnChucnang, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel1, "card2");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnDangkiMondayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDangkiMondayActionPerformed
        // TODO add your handling code here:
        try {            
            new DialogDangKyMonDay(this, true, maGV, tenGV, matkhau).setVisible(true);                        
        } catch (Exception e) {
            e.printStackTrace();
        }
    }//GEN-LAST:event_btnDangkiMondayActionPerformed

    private void btnNhapdiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNhapdiemActionPerformed
        // TODO add your handling code here:
        try {           
            new frmNhapdiem(maGV, tenGV, matkhau).setVisible(true);
            this.setVisible(false);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }//GEN-LAST:event_btnNhapdiemActionPerformed

    private void btnThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThoatActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
        new FormLogin(this, rootPaneCheckingEnabled).setVisible(true);
    }//GEN-LAST:event_btnThoatActionPerformed

    private void btnDoiMKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDoiMKActionPerformed
        // TODO add your handling code here:
        new DialogDoiMatkhau(this, true, lbMaGV.getText()).setVisible(true);
    }//GEN-LAST:event_btnDoiMKActionPerformed

    private void btnXemLichGDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnXemLichGDActionPerformed
        // TODO add your handling code here:
        try{
            new DialogLichGiangDay(this, rootPaneCheckingEnabled, maGV, tenGV).setVisible(true);
        }
        catch(Exception e){
            e.printStackTrace();
        }
    }//GEN-LAST:event_btnXemLichGDActionPerformed

    private void btnXemThongbaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnXemThongbaoActionPerformed
        // TODO add your handling code here:
        try{
            new DialogXemThongBao(this, true, maGV, 1).setVisible(true);
        }
        catch(Exception e){
            e.printStackTrace();
        }
    }//GEN-LAST:event_btnXemThongbaoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmGiaovien.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmGiaovien.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmGiaovien.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmGiaovien.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new frmGiaovien().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDangkiMonday;
    private javax.swing.JButton btnDoiMK;
    private javax.swing.JButton btnNhapdiem;
    private javax.swing.JButton btnThoat;
    private javax.swing.JButton btnXemLichGD;
    private javax.swing.JButton btnXemThongbao;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JLabel lbMaGV;
    private javax.swing.JLabel lbTen;
    private javax.swing.JPanel pnChucnang;
    private javax.swing.JPanel pnThongtin;
    // End of variables declaration//GEN-END:variables
}
